home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Diskmonitors / DPU / DPU.doc < prev    next >
Text File  |  1996-09-26  |  25KB  |  599 lines

  1.      *****************************************************************
  2.      *                                                               *
  3.      *                    Disk Peek and Update (DPU)                 *
  4.      *                                                               *
  5.      *                          Version 1.5                          *
  6.      *                                                               *
  7.      *                          9 July 1993                          *
  8.      *                                                               *
  9.      *               Copyright © 1992-1993 Frans Zuydwijk            *
  10.      *                                                               *
  11.      *****************************************************************
  12.      
  13.      
  14.      Table of contents
  15.      
  16.       1. Introduction
  17.       2. Distribution
  18.       3. Be careful with writing
  19.       4. Controlling DPU
  20.       5. Functions in the main menu
  21.          5.1. Select Device
  22.          5.2. Show Device Info
  23.          5.3. Show BitMap
  24.          5.4. Check Disk
  25.          5.5. Zap File
  26.          5.6. Zap Disk
  27.          5.7. Zap FileSystem
  28.          5.8. Zap Rigid Disk Blocks
  29.       6. Edit Sector
  30.       7. Pulldown menus
  31.          7.1. Project menu
  32.          7.2. Settings menu
  33.          7.3. Zap FileSystem menu
  34.       8. Developing environment
  35.       9. Thanks
  36.      10. Bug reports
  37.      11. History
  38.      
  39.      
  40.      
  41.      1. Introduction
  42.      
  43.      DPU is a program, which enables you to get information about the
  44.      physical contents of your disks and diskfiles. Furthermore you can
  45.      change these contents.
  46.      
  47.      Starting at version 1.3, DPU requires Release 2.04 or higher.
  48.      
  49.      Currently DPU can handle OFS (DOS\0) and FFS (DOS\1) disks. CrossDOS
  50.      devices (MSD\0 and MSH\0) are recognized, but not all functions can be
  51.      performed on the MSDOS disks.
  52.      
  53.      In Release 2.1 and 3.0 there are new filesystems introduced. Since I
  54.      do not have documentation about them yet, DPU will treat them as other
  55.      unknown filesystems.
  56.      
  57.      
  58.      2. Distribution
  59.      
  60.      DPU is NOT Public Domain, but copyrighted freeware : it may be
  61.      distributed and used freely.
  62.      
  63.      DPU may not be sold, but inclusion in a PD-library is permitted as
  64.      long as only a SMALL fee is charged to cover the costs of copying and
  65.      distribution. The Fred Fish Library is the perfect example.
  66.      
  67.      Program and documentation must be distributed together.
  68.      It concerns the files DPU, DPU.info, DPU.doc and DPU.doc.info.
  69.      
  70.      
  71.      3. Be careful with writing.
  72.      
  73.      DPU writes data to your disk in two cases :
  74.        - When you use the Write gadget in the 'Edit' environment. To be on
  75.          the safe side, you have to press a Shift key at the same time too.
  76.      
  77.        - When you select 'Force validation'. DPU sets the BitMap flag in
  78.          the rootblock to invalid. The validation process of AmigaDOS will
  79.          set it to valid again after successful validation.
  80.      
  81.      If you want to change anything, be sure that you know what you do,
  82.      it's easy to corrupt an executable file or a whole disk.
  83.      
  84.      I do not take any responsibility for what you do with this program.
  85.      
  86.      
  87.      4. Controlling DPU
  88.      
  89.      DPU uses a 640 x 256 screen. On a PAL system this is not a problem,
  90.      but on a NTSC system this is not always possible without interlace. 
  91.      
  92.      Therefore DPU asks the Display Database, if a PAL HiRes screen can be
  93.      opened. For a NTSC system this means, that there must be an Agnus chip
  94.      which can switch between NTSC and PAL, and that the user must have
  95.      indicated, that PAL screens can be displayed on his monitor, either by
  96.      supplying an AddMonitor command in the startup sequence or by copying
  97.      the file PAL from the MonitorStore drawer to the Monitors drawer.
  98.      
  99.      If a PAL HiRes screen is not possible according to the Display
  100.      Database, an NTSC HiRes interlaced screen will be used.
  101.      
  102.      DPU will use your default system text font, provided it is 8 pixels
  103.      high and 8 pixels wide. If this font has a companion 9 pixels high and 
  104.      10 pixels wide, this will be used for gadget texts etc. Default
  105.      Topaz-8 and Topaz-9 will be used.
  106.      
  107.      You control DPU by mouse and/or function keys.
  108.      
  109.      The button gadgets can be operated by clicking the mouse on them.
  110.      Operation can also be done by pressing the (function) key indicated on
  111.      the gadget.
  112.      
  113.      In case of writing you must press a shift key together with pressing
  114.      the function key or clicking the gadget.
  115.      
  116.      Requesters are used to ask or supply information.
  117.      Instead of clicking on an OK or Continue gadget in a requester, you
  118.      may also press the Return key. Cancel gadgets can only be operated by
  119.      clicking on them.
  120.      
  121.      
  122.      5. Functions in the main menu
  123.                  
  124.      In the main menu you see the possible functions.
  125.      
  126.      Choose a function by clicking on the gadget or pressing the
  127.      corresponding function key.
  128.      
  129.      You must select a device first, before you can perform the other
  130.      functions. The only exception is the Zap File function.
  131.      
  132.      If DPU does not recognize the DosType of the currently selected
  133.      device, you may choose to cancel or to treat the device the same as a
  134.      known one.
  135.      
  136.      If DPU cannot find Rigid Disk Blocks for the currently selected
  137.      device, the Zap RDB gadget will be ghosted.
  138.      
  139.      If you select one of the functions Check Disk, Zap Disk, Zap File-
  140.      System or Zap Rigid Disk Blocks, access to the current device will be
  141.      inhibited if the 'Inhibit access' menu item is checkmarked. Selection
  142.      of any other function will undo an existing access inhibition.
  143.      
  144.      
  145.      5.1. Select Device
  146.      
  147.      This function shows you the disk devices, which DPU has found. If
  148.      there is a volume present, it's name is shown. 
  149.      
  150.      Select the device you want to operate upon. You cannot select a device
  151.      without a volume present.
  152.      
  153.      
  154.      5.2. Show Device Info
  155.      
  156.      This function shows you some information about the selected device.
  157.      
  158.      F1:  MountList --> Create a MountList entry. All information is taken
  159.                         from the devicelist in memory, except for GlobVec
  160.                         (always set to -1) and Mount (always set to 1).
  161.                         A filename is selected in a ASL filerequester and
  162.                         the MountList entry is appended to this file. The
  163.                         file is created, if it does not exist yet.
  164.      
  165.      F10: Menu      --> Go back to the main menu.
  166.      
  167.      
  168.      5.3. Show BitMap
  169.      
  170.      This function reads the bitmap sectors of the selected device and
  171.      shows the usage of the disk in a graphical way. 
  172.      
  173.      For a floppy disk each rectangle represents a sector, but for harddisk
  174.      partitions each rectangle represents one or more sectors, as indicated
  175.      on the screen.
  176.      
  177.      A white rectangular line is used as a cursor, to point at one of the
  178.      sector rectangles. You can move this cursor with the cursor keys and
  179.      the mouse. The text line just above the gadgets tells you at which
  180.      sector the cursor is pointing.
  181.      
  182.      F1: Disk      --> Show the bitmap for the whole disk.
  183.      
  184.      F2: System    --> Show the bitmap for the filesystem blocks (directory
  185.                        blocks, file headers etc.).
  186.      
  187.      F3: Directory --> Show the bitmap for a selected directory.
  188.                        Select the directory in the ASL filerequester.
  189.      
  190.      F4: File      --> Show the bitmap for a selected file.
  191.                        Select the file in the ASL filerequester.
  192.      
  193.      F10: Menu     --> Go back to the main menu, or return to Zap File-
  194.                        System if you came from there.
  195.      
  196.      
  197.      5.4. Check Disk
  198.      
  199.      This function reads all sectors of the selected device track by track.
  200.      Errors encountered are reported.
  201.      
  202.      In a requester the current track is reported. You may abort this
  203.      function by clicking the Cancel gadget in this requester.
  204.      
  205.      
  206.      5.5. Zap File
  207.      
  208.      You are requested by means of the ASL requester to supply the name of
  209.      the file to be edited. If, for some reason, the ASL requester cannot
  210.      be used, a simple requester will be used instead.
  211.      
  212.      The file is read and shown sector by sector (512 bytes).
  213.      You can walk through the file using mouse or function keys.
  214.      
  215.      F1: Edit      --> Edit sector, see the 'Edit sector' section.
  216.      
  217.      F2: Find      --> Search for an ASCII or HEX string. 
  218.                        A requester appears, in which you must enter the
  219.                        string. To indicate ASCII or HEX, click the ASC/HEX
  220.                        gadget to toggle.
  221.                        Searching starts at the current sector. Progress is
  222.                        reported in a requester. You may click the Cancel
  223.                        gadget to abort searching.
  224.      
  225.      F3: Find Next --> Search for the next instance of the string.
  226.      
  227.      F4: Not used.
  228.      
  229.      F5: Goto      --> Go to a specific sector.
  230.                        You must specify the number of this sector in a
  231.                        requester. 
  232.      
  233.      F6: Top       --> Go to the first sector.
  234.      
  235.      F7: Backward  --> Go to the previous sector.
  236.      
  237.      F8: Forward   --> Go to the next sector.
  238.      
  239.      F9: Bottom    --> Go to the last sector.
  240.      
  241.      F10: Menu     --> Go back to the main menu.
  242.      
  243.      
  244.      5.6. Zap Disk
  245.      
  246.      The first sector of the selected device is read and shown.
  247.      You can walk through the disk using mouse or function keys.
  248.      
  249.      F1: Edit      --> Edit sector, see the 'Edit sector' section.
  250.      
  251.      F2: Find      --> Search for an ASCII or HEX string. 
  252.                        A requester appears, in which you must enter the
  253.                        string. To indicate ASCII or HEX, click the ASC/HEX
  254.                        gadget to toggle.
  255.                        Searching starts at the current sector. Progress is
  256.                        reported in a requester. You may click the Cancel
  257.                        gadget to abort searching.
  258.      
  259.      F3: Find Next --> Search for the next instance of the string.
  260.      
  261.      F4: Identify  --> Identify current sector.
  262.                        The AmigaDOS file structure is searched for the
  263.                        current sector number and info about the sector is
  264.                        reported, e.g. 'sector is free', or 'sector is block
  265.                        xx in file yy'.
  266.                        Progress is reported in a requester. You may click
  267.                        the Cancel gadget to abort searching.
  268.      
  269.      F5: Goto      --> Go to a specific sector.
  270.                        You must specify the number of this sector in a
  271.                        requester. To indicate ASCII or HEX, click the
  272.                        ASC/HEX gadget to toggle.
  273.      
  274.      F6: Top       --> Go to the first sector.
  275.      
  276.      F7: Backward  --> Go to the previous sector.
  277.      
  278.      F8: Forward   --> Go to the next sector.
  279.      
  280.      F9: Bottom    --> Go to the last sector.
  281.      
  282.      F10: Menu     --> Go back to the main menu.
  283.      
  284.      
  285.      5.7. Zap FileSystem
  286.      
  287.      The root sector of the selected device is read and shown.
  288.      
  289.      You can move through the 4-byte longwords in a sector using mouse or
  290.      cursor keys. If 'Show item info' in the Settings menu is checkmarked,
  291.      a window is opened at the right side of the screen, showing you info
  292.      about the highlighted longword and a list of items in this sector.
  293.      Selecting a list item will highlight the corresponding longword.
  294.      
  295.      In case the highlighted longword points to another sector in the
  296.      filestructure, the Jump gadget becomes non-ghosted and you may jump to
  297.      that sector. Jumping is performed by pressing F5 or clicking the 'F5:
  298.      Jump' gadget or clicking the highlighted longword. In this way you can
  299.      walk through all sectors of the filestructure (root-, directory-,
  300.      fileheader-, hardlink-, softlink-, file extension- and datablocks).
  301.      
  302.      You can walk through the filestructure using mouse or function keys.
  303.      The functions of the gadgets/function keys vary, depending on the type 
  304.      of the current block.
  305.      
  306.      F1: Edit      --> Edit sector, see the 'Edit sector' section.
  307.      
  308.      F2: Date      --> Show the date(s) in the current block.
  309.      
  310.      F3: BitMap    --> Show the BitMap of the disk/partition.
  311.                        Root block only.
  312.      F3: Root      --> Go to the root block. 
  313.      
  314.      F4: Locate    --> A directory or fileheader block can be located.
  315.                        A requester appears and asks for the name. The 
  316.                        AmigaDOS file structure is then searched for a block
  317.                        with this name. If found, go to the block.
  318.      
  319.      F5: Jump      --> Go to the block, indicated by the currently selected
  320.                        longword. If the longword does not contain a valid
  321.                        sector number, the gadget is ghosted. 
  322.      
  323.      F6: Parent    --> Go to the parent block of the current block.
  324.      F6: Header    --> Go to the fileheader block of the current block.
  325.      
  326.      F7: HashChain --> Go to the block, indicated by the hashchain
  327.                        longword.
  328.      F7: Backward  --> Go to the previous data block.
  329.      
  330.      F8: Data      --> Go to the first data block of the file.
  331.      F8: Forward   --> Go to the next data block.
  332.      F8: Link      --> Go to the block, indicated by the hardlink
  333.                        longword.
  334.      
  335.      F9: LinkBack  --> Go to the block, indicated by the hardlinkback
  336.                        longword.
  337.      F9: Extens.   --> Go to the block, indicated by the file extension 
  338.                        longword.
  339.      F9: Last Bl.  --> Go to the last data block.
  340.      
  341.      F10: Menu     --> Go back to the main menu.
  342.      
  343.      For some special functions, see 7.3. Zap FileSystem pulldown menu.
  344.      
  345.      
  346.      5.8. Zap Rigid Disk Blocks
  347.      
  348.      With this function you can see the contents of the Rigid Disk Blocks
  349.      on your harddisk. You can change it too, but again : know what you do!
  350.      
  351.      When you select a harddisk partition with Select Device, DPU checks if
  352.      the first physical cylinder of this harddisk contains RDB information.
  353.      If not, the gadget of this function will be ghosted.
  354.      
  355.      DPU reads the RDSK block and shows it to you.
  356.      
  357.      From here you can walk through the blocks using mouse or function
  358.      keys. The functions of the gadgets/function keys vary, depending on
  359.      the type of the current block.
  360.      
  361.      You can move through the 4-byte longwords in a block using mouse or
  362.      cursor keys. The top line describes the purpose of each longword. 
  363.      
  364.      If 'Show item info' in the Settings menu is checkmarked, a window is
  365.      opened at the right side of the screen, showing you a list of items in
  366.      this block. Selecting a list item will highlight the corresponding
  367.      longword.
  368.      
  369.      F1: Edit      --> Edit sector, see the 'Edit sector' section.
  370.      
  371.      F2: Go RDSK   --> Go to the RDSK block.
  372.      F2: Go BADB   --> Go to the first/next BADB block.
  373.      
  374.      F3: Go PART   --> Go to the first/next PART block.
  375.      
  376.      F4: Go FSHD   --> Go to the first/next FSHD block.
  377.      
  378.      F5: Go LSEG   --> Go to the first/next LSEG block.
  379.      
  380.      F6: Top       --> Go to the first RDB.
  381.      
  382.      F7: Backward  --> Go to the previous RDB.
  383.      
  384.      F8: Forward   --> Go to the next RDB.
  385.      
  386.      F9: Bottom    --> Go to the last RDB.
  387.      
  388.      F10: Menu     --> Go back to the main menu.
  389.      
  390.      
  391.      6. Edit Sector
  392.      
  393.      When you select 'Edit' in one of the above functions, a cursor appears 
  394.      and a new set of function gadgets is shown.
  395.      
  396.      You may now type over the information in the current sector. The new
  397.      characters are shown in a different color.
  398.      
  399.      You can move the cursor with mouse or cursor keys.
  400.      
  401.      Nothing will be changed on disk, unless you select the 'SF5: Write'
  402.      gadget or press the F5 function key. In both cases you have to press a
  403.      Shift key at the same time too.
  404.       
  405.      F1: Hex/Asc --> Toggle between hexadecimal and Ascii editing.
  406.      
  407.      F2: Load    --> Load the sector from a file.
  408.                      You are asked to supply a filename and a blocknumber.
  409.                      The bytes for this sector are read from the file,
  410.                      starting at position 'blocknumber * 512'. The bytes
  411.                      of the current sector in memory are overwritten now.
  412.                      If you use the 'Write' function, the sector on disk
  413.                      will be overwritten too, of course.
  414.      
  415.      F3: Save    --> Save the sector in a file. 
  416.                      You are asked to supply a filename. The bytes of the
  417.                      sector are written to this file. In case the file
  418.                      already exists, the bytes are appended to the file.
  419.      
  420.      F4: Print   --> Print sector.
  421.      
  422.      SF5: Write  --> Write sector. You must press a shift key too.
  423.                      If the sector contains a checksum, this will be
  424.                      computed before writing, if 'Compute checksums' in 
  425.                      the 'Settings' menu is checkmarked.
  426.                      Warning : DPU computes a checksum only, if it
  427.                      recognizes the sector. For instance, if you change the
  428.                      identifying first or last longword of a FFS 
  429.                      fileheader, DPU may think it is a datablock and will
  430.                      not compute a checksum.
  431.      
  432.      F6: Top     --> Move cursor to first byte.
  433.      
  434.      F7: Not used.
  435.      
  436.      F8: Not used.
  437.      
  438.      F9: Bottom  --> Move cursor to last byte.
  439.      
  440.      F10: Return --> Leave edit environment and return to function.
  441.                      If you did not select 'SF5: Write', the current sector
  442.                      will be unchanged.
  443.      
  444.      
  445.      7. Pulldown menus
  446.      
  447.      7.1. Project menu
  448.           - About... : shows the info-requester.
  449.      
  450.           - Quit DPU : quits DPU. Shortcut Right Amiga key + Q.
  451.      
  452.      7.2. Settings menu
  453.           - Skip requesters : if ON, the progress requesters reporting
  454.             directory/file scanning will be skipped. Advantage : much
  455.             faster. Disadvantage : you cannot cancel the action and you
  456.             see no progress on screen. Default OFF. Shortcut Right Amiga
  457.             key + R.
  458.      
  459.           - Show hex offsets : show offsets in sector/block in hexadecimal
  460.             instead of decimal. Selecting this is effective when the next
  461.             sector is displayed. Default OFF. Shortcut Right Amiga key + H.
  462.      
  463.           - Show item info : if ON, a window will appear at the right side
  464.             of the screen during Zap FileSystem or Zap RDB. In this window
  465.             you see a list of the items in the current sector. Selecting an
  466.             item in this list will highlight the corresponding longword in
  467.             the sector. In Zap FileSystem you see also information about
  468.             the highlighted longword in this window. Default ON. Shortcut
  469.             Right Amiga key + I.
  470.      
  471.           - Inhibit access : inhibit access to current device by others.
  472.             Only applicable for the functions Check Disk, Zap Disk, Zap 
  473.             FileSystem and Zap Rigid Disk Blocks. The status of the current
  474.             device is changed immediately. Default ON.
  475.      
  476.           - Compute checksums : compute checksums for floppy bootblocks, 
  477.             filesystem blocks and Rigid Disk Blocks. Default ON. You should
  478.             have a good reason to set this OFF.
  479.      
  480.      7.3. Zap FileSystem menu
  481.           This menu will be accessible only during Zap FileSystem. It
  482.           contains options, which may be useful when trying to repair a
  483.           filesystem.
  484.      
  485.           - Goto sector : go to a specific sector. 
  486.             You must specify the number of this sector in a requester. To
  487.             indicate ASCII or HEX, click the ASC/HEX gadget to toggle.
  488.             If you use this, DPU may loose track of the position in the
  489.             filesystem. 'Identify sector' will tell you the position then.
  490.      
  491.           - Identify sector : search the filesystem to identify the sector.
  492.      
  493.           - Find references : search the filesystem to find all references
  494.             to the sector. On a Old FileSystem (OFS) disk the data blocks
  495.             are not searched, although they contain references to their
  496.             header block and next data block.
  497.      
  498.           - Force validation : force AmigaDOS to validate the disk.
  499.             DPU inhibits access, reads the rootblock, rewrites it with the
  500.             BitMap flag set to invalid and releases access again. This will
  501.             start the validation process of AmigaDOS.
  502.      
  503.      
  504.      8. Developing environment
  505.      
  506.      Computer : A2000, 1 MB Chip RAM, 2 MB Fast RAM.
  507.      Devices  : - trackdisk.device (floppy disk).
  508.                 - supradirect.device (Supra WordSync Series II harddisk).
  509.                 - janus.device (Amiga partition of harddisk on PC side of
  510.                   XT Bridgeboard).
  511.      OS       : 2.04
  512.      Compiler : SAS/C 6.3
  513.      
  514.      
  515.      9. Thanks
  516.      
  517.      I like to thank the following people for their comments, suggestions,
  518.      bug reports and testing : Albert-Jan Brouwer, Arnout Grootveld, Arthur
  519.      T. Murray, Bert Hooyer, Ekke Verheul, Marcel Offermans, Paul van der
  520.      Valk, Peter Struijk, Steve Nordquist.
  521.      
  522.      
  523.      10. Bug reports
  524.      
  525.      Bug reports, comments etc. can be sent to:
  526.      
  527.          Frans Zuydwijk
  528.          Konijnenweide 84
  529.          2727GH Zoetermeer
  530.          Nederland
  531.      
  532.          FidoNet  : 2:281/614
  533.          InterNet : zuydwijk@vcgn.hacktic.nl
  534.      
  535.      
  536.      11. History
  537.      
  538.      - Version 1.0 : 9 May 1992
  539.        First release.
  540.      
  541.      - Version 1.1 : 8 June 1992
  542.        New    : - The ASL filerequester will be used in case of Release 
  543.                   2.04 or higher.
  544.        Bugfix : - The information in the BitMap Extension blocks was
  545.                   misinterpreted (partitions >= 50 MB).
  546.      
  547.      - Version 1.2 : 23 June 1992
  548.        New    : - Requester looks are changed.
  549.                 - Shift keys to indicate ASCII or HEX are replaced by a
  550.                   toggle gadget in the requesters.
  551.                 - Not used gadgets are ghosted.
  552.                 - AmigaDOS requesters are suppressed during Select Device.
  553.        Bugfix : - If the user set a high keyboard repeat rate with
  554.                   Prefs/Input, DPU could get an Address Error or hang
  555.                   during moving with the cursor keys.
  556.                 - Device names of more than 3 characters are no longer
  557.                   chopped.
  558.      
  559.      - Version 1.3 : 23 November 1992
  560.        New    : - Release 2.04 or higher is required.
  561.                 - Faster find in Zap File and Zap Disk.
  562.                 - Pulldown menus :
  563.                     - Project : About and Quit.
  564.                     - Settings : Toggles for progress requesters, hex
  565.                       offsets, inhibit access and compute checksums.
  566.                     - Zap FileSystem : Goto sector, Identify sector, Find
  567.                       references and Force validation.
  568.                 - Load and save functions in Edit Sector.
  569.                 - Bitmaps of system blocks, directory, file.
  570.                 - In case of unknown DosType, Zap FileSystem and Show
  571.                   BitMap are not allowed, and writing is not allowed in Zap
  572.                   Disk.
  573.                 - Some minor changes.
  574.      
  575.      - Version 1.4 : 19 December 1992
  576.        New    : - Default system text font used, if it's 8 x 8.
  577.                 - Jumping can be done by clicking on the highlighted
  578.                   longword (Zap FileSystem).
  579.        Bugfix : - DPU reported an error wrongly about too many bitmap
  580.                   pointers (partitions >= 50 MB).
  581.      
  582.      - Version 1.5 : 9 July 1993
  583.        New    : - In case of unknown DosType, the user has the choice
  584.                   whether to continue or not.
  585.                 - A MountList entry can be created from devicelist info in
  586.                   Show Device Info.
  587.                 - On a NTSC system, a PAL screen will be opened instead of
  588.                   an interlaced NTSC screen, if this is possible according
  589.                   to the Display Database.
  590.                 - 'Show item info' in Settings menu will bring up a window
  591.                   with item information and item list (Zap FileSystem and
  592.                   Zap RDB).
  593.                 - In Show BitMap you can move a cursor and see at which
  594.                   sector the cursor is pointing.
  595.                 - If text overscan is set with Prefs, the screen will be
  596.                   opened with that size and the window will be centered on
  597.                   the screen.
  598.      
  599.